#pragma once

#include "Timer.h"

class Player; 

class Game
{
private:
	HWND m_Window;
	HINSTANCE m_Application;

	Timer m_Timer; // timer for use in getting delta time
	Player* m_pPlayer;

public:
	bool m_bRunning;
	bool m_bFullscreen;

private:
	Game(void);
	Game(Game&);
	~Game(void);
	Game& operator=(Game&);

public:
	static Game* GetInstance() { static Game instance; return &instance; }

	void InitGame(HWND hWnd, HINSTANCE hInstance);
	void UpdateGame();
	void RenderGame();
	void EndGame();

	bool ToogleFullsceen() { return (m_bFullscreen ^= 1); }

	HWND GetWindow() const { return m_Window; }
	HINSTANCE GetApplication() const { return m_Application; }

	unsigned int GetFPS() { return m_Timer.GetFPS(); }
	float GetGlobalTime() { return m_Timer.GetGlobalTime(); }

	Player* GetPlayer() {return m_pPlayer;}
	void SetPlayer(Player* player) {m_pPlayer = player;}
};
